﻿namespace OasisCiq.Xpil
{
    using System;
    using System.Linq;

    public class ElectronicAddressIdentifierTypeList : XS.XSNormalizedString
    {
        private static readonly string[] PossibleValues = new[] 
        {
            "AIM",
            "EMAIL",
            "GOOGLE",
            "GIZMO",
            "ICQ",
            "JABBER",
            "MSN",
            "SIP",
            "SKYPE",
            "URL",
            "XRI",
            "YAHOO"
        };

        public ElectronicAddressIdentifierTypeList(string value)
            : base(value)
        {
            if (!PossibleValues.Contains(value))
            {
                throw new ArgumentOutOfRangeException();
            }
        }
    }
}